package com.example.demo2.controller;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.io.PrintWriter;

/**
 * @Description : 类描述
 * Created by cyd on 2021-05-10 23:15:23
 */
public class MyIntServlet extends HttpServlet {
    @Override
    protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
        int i = 50;
        PrintWriter out = resp.getWriter();
        // out.write(i);此时浏览器收到的是2
        out.print(i);

    }
}
